package priv.yiyuan.example.design.payment;

import java.math.BigDecimal;

/**
 * APP 支付方式
 *
 * @author YiYuan
 * @data 2025/8/14
 * @apoNote
 */
public class AppPayment extends PaymentMethod {

    public AppPayment(PaymentPlatform paymentPlatform) {
        super(paymentPlatform);
    }

    @Override
    public void pay(BigDecimal amount) {
        System.out.println("使用" + paymentPlatform.getPlatformName() + "的APP支付");
        System.out.println("调起支付APP...");
        paymentPlatform.processPayment(amount);
    }

    @Override
    public String getMethodName() {
        return "APP支付";
    }
}
